/*
 * Created on 2006-4-20 22:32:20
 */
package cn.com.sbell.vss.csg.vsclient;

import cn.com.sbell.vss.csg.vap.bean.AHInfo;
import cn.com.sbell.vss.csg.vap.bean.AlarmConfiguration;
import cn.com.sbell.vss.csg.vap.bean.CameraHide;
import cn.com.sbell.vss.csg.vap.bean.CruiseTrackInfo;
import cn.com.sbell.vss.csg.vap.bean.DeviceInfo;
import cn.com.sbell.vss.csg.vap.bean.DeviceStatistic;
import cn.com.sbell.vss.csg.vap.bean.DiskSizeInfo;
import cn.com.sbell.vss.csg.vap.bean.GPIODeviceInfo;
import cn.com.sbell.vss.csg.vap.bean.IPCameraInfo;
import cn.com.sbell.vss.csg.vap.bean.ImageAdjustingInfo;
import cn.com.sbell.vss.csg.vap.bean.ImageParameterInfos;
import cn.com.sbell.vss.csg.vap.bean.IpCameraAlarmCofig;
import cn.com.sbell.vss.csg.vap.bean.LocalStorageTask;
import cn.com.sbell.vss.csg.vap.bean.LogInfo;
import cn.com.sbell.vss.csg.vap.bean.LogRequest;
import cn.com.sbell.vss.csg.vap.bean.NTPInfo;
import cn.com.sbell.vss.csg.vap.bean.NetManageInfo;
import cn.com.sbell.vss.csg.vap.bean.NetworkCfgIn;
import cn.com.sbell.vss.csg.vap.bean.NetworkCfgOut;
import cn.com.sbell.vss.csg.vap.bean.PTZRegress;
import cn.com.sbell.vss.csg.vap.bean.PresetPTZ;
import cn.com.sbell.vss.csg.vap.bean.PtzCommander;
import cn.com.sbell.vss.csg.vap.bean.RecordFile;
import cn.com.sbell.vss.csg.vap.bean.SerialPortInfo;
import cn.com.sbell.vss.csg.vap.bean.StorageQuery;
import cn.com.sbell.vss.csg.vap.bean.TimeInfo;
import cn.com.sbell.vss.csg.vap.bean.TransparentChannelInfo;
import cn.com.sbell.vss.csg.vap.bean.UploadPic;
import cn.com.sbell.vss.csg.vap.bean.UserInfo;
import cn.com.sbell.vss.csg.vap.bean.VSCommon;
import cn.com.sbell.vss.csg.vap.bean.VideoFormat;
import cn.com.sbell.vss.csg.vap.bean.VideoInfo;
import cn.com.sbell.vss.csg.vap.bean.VideoPerformance;
import cn.com.sbell.vss.csg.vap.bean.GPIODeviceInfo.ChannelInfo;
import cn.com.sbell.vss.csg.vap.bean.ImageParameterInfos.ImageParameterInfo;

/**
 * @author liang.a.chen
 */
public interface VsClient {
	
	public final static int VS_REBOOT = 0;
	public final static int VS_SHUTDN = 1;
	
	public abstract void init();
	public abstract void close();
	public abstract int getLastStatusCode();
	public abstract AccessInfo getAccessInfo();
	
	public abstract boolean controlPtz(PtzCommander ptzCmder);
	public abstract boolean controlVs(int action);
	
//	Set/GetVsIpInfo
	public abstract boolean setNetworkInfo(NetworkCfgIn networkCfg);
	public abstract NetworkCfgOut getNetworkInfo();
	
//	Set/Get/DeleteVsUser
	public abstract boolean setUser(UserInfo userInfo);
	public abstract UserInfo[] getUser(String username);
	public abstract boolean deleteUser(String username);
	
//	Set/GetSerialPort
	public abstract boolean setSerialPortInfo(SerialPortInfo serialPortInfo);
	public abstract SerialPortInfo getSerialPortInfo(int port);

//	Set/GetVsVideo
	public abstract boolean setVideoInfo(VideoInfo videoInfo);
	public abstract VideoInfo getVideoInfo(int videoId);

//	Set/GetVsImageAdjusting
	public abstract boolean setImageAdjustingInfo(ImageAdjustingInfo imgInfo);
	public abstract ImageAdjustingInfo getImageAdjustingInfo(int videoId);

//	Set/GetVsImageFormat
	public abstract boolean setImageFormat(VideoFormat format);
	public abstract VideoFormat getImageFormat(int videoId);

//	Set/GetVsTime
	public abstract boolean setTime(TimeInfo timeInfo);
	public abstract TimeInfo getTime();

//	Set/GetVs(In)OutDev
	public abstract boolean setInOutDev(ChannelInfo channelInfo);
	public abstract GPIODeviceInfo getInOutDev();

//	Set/GetPresetPTZ
	public abstract boolean setPresetPTZ(PresetPTZ preset);
	public abstract PresetPTZ[] getPresetPTZ(int ptzId);

//	Set/GetVsImageParameters
	public abstract boolean setImageParameterInfo(ImageParameterInfo imgParams);
	public abstract ImageParameterInfos getImageParameterInfo(int videoId);
	
//	Set/GetDecoderCfg --only hikvision support
	public abstract boolean setDecoderCfg(SerialPortInfo serialPortInfo);
	public abstract SerialPortInfo getDecoderCfg(int channel);
	
//	Set/CruiseTrackInfo
	public abstract boolean setCruiseTrackInfo(CruiseTrackInfo cruiseTrackInfo);
	public abstract CruiseTrackInfo[] getCruiseTrackInfo(Integer ptzId, Integer cruiseNumber);
	//transparentChannel
	public abstract boolean transparentChannel(TransparentChannelInfo transparentChannelInfo);

//---------------------------------- LOCAL STORAGE -------------------------------

	public abstract boolean setVsLocalStorageTask(LocalStorageTask storageTask);
	public abstract LocalStorageTask getVsLocalStorageTask(int videoId);
	public abstract boolean stopVsLocalStorageTask(int videoId, boolean isStop);
	public abstract RecordFile[] queryVsLocalStorageFiles(StorageQuery query);
	public abstract DiskSizeInfo[] queryVsLocalDisk();
//---------------------------------- ALARM ---------------------------------------
	public abstract boolean setVsAlarmConfiguration(AlarmConfiguration alarmCfg);
	public abstract AlarmConfiguration getVsAlarmConfiguration();
	
//---------------------------------- UPGRADE -------------------------------------
	public abstract void requestVsUpgrade(String fileURL,int timeout,String deviceId);
	
	public abstract DeviceInfo requestVsDeviceInfo();
	public abstract DeviceStatistic getVsWorkState();
	
//------------------------------------IPCAMERA----------------------------------
	public abstract boolean setNTP(NTPInfo ntpInfo);
	public abstract NTPInfo getNTP();
	public abstract boolean setIPCameraInfo(IPCameraInfo ipCameraInfo);
	public abstract IPCameraInfo getIPCameraInfo();
	public abstract boolean setIpcameraMotionDetect(IpCameraAlarmCofig alarmConfig);
	
	public abstract boolean setDeviceId(String id);
	
	public abstract boolean setHideImageArea(CameraHide cameraHide);
	public abstract CameraHide getHideImageArea(int cameraNumber);
	
//------------------------------------VSCommon-------------------------------------
	public abstract boolean setVSCommon(VSCommon commonInfo);
	public abstract VSCommon getVSCommon();
	
//------------------------------------Net Manage--------------------------------
	public abstract boolean setNetManageInfo(NetManageInfo netManageInfo);
	public abstract NetManageInfo getNetManageInfo();
	
//------------------------------------Vs Performance CPU MEM DISK -------------------------
	public abstract VideoPerformance getVsPerformance(String statisticTarget);
	
//	------------------------------------Vs GetVsLog -------------------------
	public abstract LogInfo[] getVsLog(LogRequest logRequest);
//	------------------------------------AH client
	public abstract AHInfo GetAlarmHostInfo();
	public abstract AHInfo SetAlarmHostInfo(AHInfo ahInfo);
	public abstract String requestAhDeviceInfo(String deviceId);
//	------------------------------------hik PPPoE ---------------------------
	public abstract int GetVsPPPoEPeriod();
	public abstract boolean SetVsPPPoEPeriod(int validDays);
//	------------------------------------hik print log------------------------
	public abstract boolean SetVsLogPrint(int isPrint);
//	---------------------------------trig record--------------------
	public abstract boolean recordVideo(Integer[] videoIds,Integer duration);
	
//	-------------------------------upload pic-----------------------
	public abstract boolean setUploadPicture(UploadPic up);
	public abstract UploadPic getUploadPicture(String deviceId);
	
//	-------------------------------------PTZ regress -------------------
	public abstract PTZRegress getPTZRegress(int ptzId);
	public abstract boolean setPTZRegress(PTZRegress ptzRegress);
//	Set/GetVsImageParameters
	public abstract boolean setImageParameterInfo_3N(ImageParameterInfo imgParams);
	public abstract ImageParameterInfos getImageParameterInfo_3N(int videoId);
}
